import api from './http'

// const url = 'http://192.168.31.6:8095'
// const url = 'https://live-stock.live'
const url = ''


// 线上
// 登录
export const loginApi = (params) => api.post(url + '/v1/index/login', params, { isLoginRequest: true, }) // 登录
export const build_client_room = (params) => api.post(
    url + '/v1/live_stream_front_end/build_client_room',
    params,
    {
        headers: {
            SystemId: 'Test_0001'
        }
    }
) // 绑定用户到房间
export const sendMsg = (params) => api.post(url + '/v1/live_stream_front_end/send_msg', params) // 发送消息
export const shenyuemsg = (params) => api.post(url + '/v1/live_stream_front_end/check', params) // 审阅消息
export const siliao = (params) => api.post(url + '/v1/live_stream_front_end/private_chat', params) // 私聊消息
export const tuichu = () => api.get(url + '/v1/live_stream_front_end/logout') // 退出
export const lishi = (params) => api.post(url + '/v1/live_stream_front_end/init', params) // 获取历史消息
export const chushi = () => api.get(url + '/v1/index/init') // 初始化
export const renshu = () => api.get(url + '/v1/live_stream_front_end/get_room_peoples') // 初始化
export const getren = () => api.get(url + '/v1/index/get_count') // 初始化



// 本地
// export const loginApi = (params) => api.post('http://localhost:8080/api/v1/index/login', params, { isLoginRequest: true, }) // 登录
// export const build_client_room = (params) => api.post('http://localhost:8080/api/v1/live_stream_front_end/build_client_room', params) // 绑定用户到房间
// export const sendMsg = (params) => api.post('http://localhost:8080/api/v1/live_stream_front_end/send_msg', params) // 发送消息
// export const shenyuemsg = (params) => api.post('http://localhost:8080/api/v1/live_stream_front_end/check', params) // 审阅消息
// export const siliao = (params) => api.post('http://localhost:8080/api/v1/live_stream_front_end/private_chat', params) // 私聊消息
// export const tuichu = (params) => api.post('http://localhost:8080/api/v1/live_stream_front_end/logout', params) // 退出
// export const lishi = (params) => api.post('http://localhost:8080/api/v1/live_stream_front_end/init', params) // 获取历史消息









// http://154.94.6.121/
// 192.168.0.189:8080
// https://www.live-stock.org/
// http://localhost:8080/api